<?php

namespace App\Strategies;

use App\Constants\AccountConstant;
use App\Constants\CreditConstant;
use App\Helpers\DateUtils;
use App\Helpers\Formater\NumberFormater;
use App\Helpers\Utils;
use App\Strategies\UserStrategy;

/**
 * 账户流水公共策略
 *
 * Class UserStrategy
 * @package App\Strategies
 */
class PointStrategy extends AppStrategy
{

    /**
     * 通过兑换券类型拿到对应的积分
     */
    public static function getCredit($type)
    {

        switch ($type)
        {
            case 1 :
          $credit =1000;
                break;
            case 2 :
           $credit = 1500;
          break;
        }
        return $credit;
    }

    /**
     * 通过兑换积分获得对应的金钱
     */
    public static function getCash($credit)
    {

        switch ($credit)
        {
            case 1000 :
                $credit =2;
                break;
            case 1500 :
                $credit = 5;
                break;
        }
        return $credit;
    }

}